package com.spring.annotation.project.service;

import com.spring.annotation.project.dao.MyDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by Tom.
 */
@Service
public class MyService {
//    @Qualifier("dao")
    @Resource
//    @Autowired
    private MyDao dao1;

    public void print(){
        System.out.println(dao1);
    }
}
